<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div">
    	<div class="row">
	        <div class="col-sm-12 select-info order-table">
		        <table id="bootstrap-table" data-mobile-responsive="true">
		        </table>
	        </div>
	    </div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "module/machineRecord"

        $(function() {
            var options = {
                url: prefix + "/list",
                modalName: "闸机下发记录",
                search: false,
		        showExport: false,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'machineIP', 
					title : '闸机IP' 
				},
				{
					field : 'icNumber', 
					title : 'IC卡号' 
				},
				{
					field : 'status', 
					title : '状态',
					formatter: function(value, row, index) {
		                if (value == '1') {
		                    return '<span class="badge badge-primary">成功</span>';
		                } else if (value == '0') {
		                    return '<span class="badge badge-danger">失败</span>';
		                }
		            }
				},
				{
					field : 'createTime', 
					title : '上报时间' 
				}]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>